package com.frkj.yuan.activity;

import android.view.View;
import android.widget.TextView;

import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;

import com.frkj.yuan.R;
import com.frkj.yuan.adapter.BaseRecyclerHolder;
import com.frkj.yuan.adapter.BaseRecyclerRefreshAdapter;
import com.frkj.yuan.base.BaseActivity;
import com.frkj.yuan.data.YuyueKeshiDataUtils;
import com.frkj.yuan.utils.FullScreenUtils;
import com.frkj.yuan.view.RecyclerViewLayoutManager;

import java.io.IOException;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;
import cn.ycbjie.ycstatusbarlib.bar.YCAppBar;

/**
 * 信息说明: 检查报告界面
 * company: 兰州丰荣信息科技有限公司
 * 创建时间: on 2022/3/8 11 ：05
 * 项目名称：yuanban
 */
public class CheckReportActivity extends BaseActivity {
    @BindView(R.id.base_title)
    TextView mTitlMesg;
    @BindView(R.id.base_recycler)
    RecyclerView mRecyclerViews;
    private BaseRecyclerRefreshAdapter<String> mAdapter;
    @Override
    public int getLayoutId() {
        return R.layout.activity_check_report;
    }
    @Override
    public void initLayoutView() {
        FullScreenUtils.getInstance().fullScreen(CheckReportActivity.this,true);
        mTitlMesg.setText("检测报告");
        RecyclerViewLayoutManager.setLinearVerticalManager(CheckReportActivity.this, mRecyclerViews);
        List<String> mlist = YuyueKeshiDataUtils.getYuyueLeftList();
       mAdapter =  new BaseRecyclerRefreshAdapter<String>(CheckReportActivity.this, mlist, R.layout.check_item_report) {
            @Override
            public void convert(BaseRecyclerHolder holder, String item, int position, boolean isScrolling) throws IOException {

            }
        };
        mRecyclerViews.setAdapter(mAdapter);
        mAdapter.setOnItemClickListener(new BaseRecyclerRefreshAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(RecyclerView parent, View view, int position) {
                openActivityWitchAnimation(CheckReportDetialsActivity.class);
            }
        });


    }

    @OnClick(R.id.base_back)
    public void OnClick() {
        finishWitchAnimation();
    }
}
